package com.bcx.controller;

import com.bcx.pojo.District;
import com.bcx.service.DistrictService;

import com.bcx.tool.ResultEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class DistrictController {
    @Resource
    DistrictService districtService;
    @RequestMapping("/getdistrictList")
    public ResultEntity<List<District>>getDistrict(){
        List<District> districtList=districtService.selectAll();
        return ResultEntity.successWithoutData(districtList);
    }
}
